package com.at.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class UserController {

    @RequestMapping("/add")
    @PreAuthorize("hasAnyAuthority('add')")
    public String add() {
        return "添加成功";
    }

    @RequestMapping("/delete")
    @PreAuthorize("hasAnyAuthority('delete')")
    public String delete() {
        return "删除成功";
    }

    @RequestMapping("/update")
    @PreAuthorize("hasAnyAuthority('update')")
    public String update() {
        return "更新成功";
    }
}
